Web Application Development with Yii and PHP Second Edition by Unknown
Author:Unknown
Language: eng
Format: epub
Publisher: Packt Publishing
Configuring the authorization manager
Before we can establish an authorization hierarchy, assign users to roles, and perform access permission checking, we need to configure the authorization manager application component, authManager. This component is responsible for storing the permission data and managing the relationships between permissions. It also provides the methods to check whether or not a user has access to perform a particular operation. Yii provides two types of authorization managers CPhpAuthManager and CDbAuthManager. CPhpAuthManager uses a PHP script file to store the authorization data. CDbAuthManager, as you might have guessed, stores the authorization data in a database. The authManager is configured as an application component. Configuring the authorization manager consists simply of specifying which of these two types to use and then setting its initial class property values.
We'll use the database implementation for our application. To make this configuration, open up the main configuration file, protected/config/main.php, and add the following to the application components array:
// application components 'components'=>array( … 'authManager'=>array( 'class'=>'CDbAuthManager', 'connectionID'=>'db', ),
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(14777)
The Mikado Method by Ola Ellnestam Daniel Brolund(12037)
Hello! Python by Anthony Briggs(11948)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(11367)
Dependency Injection in .NET by Mark Seemann(11134)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10527)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(9965)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(9572)
Grails in Action by Glen Smith Peter Ledbrook(9291)
Hit Refresh by Satya Nadella(9039)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(8892)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(8758)
The Kubernetes Operator Framework Book by Michael Dame(8473)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(8359)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8293)
Robo-Advisor with Python by Aki Ranin(8247)
Practical Computer Architecture with Python and ARM by Alan Clements(8222)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(8192)
Building Low Latency Applications with C++ by Sourav Ghosh(8096)